package cn.csdj.sism.service.impl;

import cn.csdj.sism.dao.DeptMapper;
import cn.csdj.sism.pojo.Dept;
import cn.csdj.sism.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * DeptService实现类
 * 夏锦红
 * 2023/4/7
 */
@Service
public class DeptServiceImpl implements DeptService {
    @Autowired
    private DeptMapper deptMapper;
    @Override
    public int insert(Dept dept) {
        return deptMapper.insert(dept);
    }

    @Override
    public int deleteById(Integer id) {
        return deptMapper.deleteById(id);
    }

    @Override
    public int update(Dept dept) {
        return deptMapper.updateById(dept);
    }

    @Override
    public Dept selectById(Integer id) {
        return deptMapper.selectById(id);
    }

    @Override
    public List<Dept> selectAll() {
        return deptMapper.selectList(null);
    }
}
